package com.example.lp.basemvp;

import android.arch.lifecycle.Lifecycle;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.example.lp.basemvp.baseview.IBaseView;
import com.example.lp.basemvp.baseview.IStartView;
import com.example.lp.basemvp.bean.Start;
import com.example.lp.basemvp.presebter.BasePrsenter;
import com.example.lp.basemvp.presebter.IBasePresenter;
import com.example.lp.basemvp.presebter.StartPresenter;
import com.example.lp.basemvp.proxy.MvpProxyIml;
import com.example.lp.lpmvp.R;

import java.util.List;

public abstract class BaseMvpActivity<T extends IBasePresenter, V extends IBaseView> extends AppCompatActivity {

    private MvpProxyIml mvpProxyIml;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mvpProxyIml = new MvpProxyIml((V) this);
        mvpProxyIml.bindAndCreatePresenter();
        getLifecycle().addObserver(mvpProxyIml);
    }
}